package cn.yy.pojo;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Month entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "month", catalog = "phoneerp")
public class Month implements java.io.Serializable {

	// Fields

	private Integer monthId;
	private String months;
	private Set<Financialposition> financialpositions = new HashSet<Financialposition>(
			0);
	private Set<Profit> profits = new HashSet<Profit>(0);
	private Set<Reposity> reposities = new HashSet<Reposity>(0);
	private Set<Wages> wageses = new HashSet<Wages>(0);
	private Set<Cash> cashs = new HashSet<Cash>(0);
	private Set<Bonus> bonuses = new HashSet<Bonus>(0);

	// Constructors

	/** default constructor */
	public Month() {
	}

	/** minimal constructor */
	public Month(String months) {
		this.months = months;
	}

	/** full constructor */
	public Month(String months, Set<Financialposition> financialpositions,
			Set<Profit> profits, Set<Reposity> reposities, Set<Wages> wageses,
			Set<Cash> cashs, Set<Bonus> bonuses) {
		this.months = months;
		this.financialpositions = financialpositions;
		this.profits = profits;
		this.reposities = reposities;
		this.wageses = wageses;
		this.cashs = cashs;
		this.bonuses = bonuses;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "monthId", unique = true, nullable = false)
	public Integer getMonthId() {
		return this.monthId;
	}

	public void setMonthId(Integer monthId) {
		this.monthId = monthId;
	}

	@Column(name = "months", nullable = false, length = 5)
	public String getMonths() {
		return this.months;
	}

	public void setMonths(String months) {
		this.months = months;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "month")
	public Set<Financialposition> getFinancialpositions() {
		return this.financialpositions;
	}

	public void setFinancialpositions(Set<Financialposition> financialpositions) {
		this.financialpositions = financialpositions;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "month")
	public Set<Profit> getProfits() {
		return this.profits;
	}

	public void setProfits(Set<Profit> profits) {
		this.profits = profits;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "month")
	public Set<Reposity> getReposities() {
		return this.reposities;
	}

	public void setReposities(Set<Reposity> reposities) {
		this.reposities = reposities;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "month")
	public Set<Wages> getWageses() {
		return this.wageses;
	}

	public void setWageses(Set<Wages> wageses) {
		this.wageses = wageses;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "month")
	public Set<Cash> getCashs() {
		return this.cashs;
	}

	public void setCashs(Set<Cash> cashs) {
		this.cashs = cashs;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "month")
	public Set<Bonus> getBonuses() {
		return this.bonuses;
	}

	public void setBonuses(Set<Bonus> bonuses) {
		this.bonuses = bonuses;
	}

}